import socket

import subprocess
#模拟cmd指令
# obj = subprocess.Popen('python',shell=True,stdout = subprocess.PIPE,
#                         stderr=subprocess.PIPE)
# print(obj.stdout.read().decode("gbk"))
# print(obj.stderr.read().decode("gbk"))
# soc = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
# soc.bind(('127.0.0.1',10086))
#
# while True:
#     data,client = soc.recvfrom(1024)
#     d = data.decode('utf-8')
#     print(d)
#     msg = d
#     soc.sendto(msg.encode('utf-8'),client)
#
#
# soc.close()

# soc = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
# soc.bind(('127.0.0.1',11012))
# soc.listen(5)
# conn, client = soc.accept()
# data = conn.recv(1024)
#
# print(data.decode('utf-8'))
# conn.send('12'.encode('utf-8'))
#
# conn.close()







